package com.eascs.web.o2o.dc.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 * 业务系统  还款计划表
 * @author ycz
 *
 */
@Entity
@Table(name = "o2o_payments_plan")
@NamedQuery(name = "O2oPaymentsPlan.findAll", query = "SELECT o FROM O2oPaymentsPlan o")
public class O2oPaymentsPlan implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 还款id
	 */
	@Id
	@Column(name = "payments_id")
	private String paymentsId;

	/**
	 * 单据编号
	 */
	@Column(name = "bill_code")
	private String billCode;

	/**
	 * 借款人姓名
	 */
	@Column(name = "name")
	private String name;

	/**
	 * 借款人证件号
	 */
	@Column(name = "id_number")
	private String idNumber;

	/**
	 * 操作人
	 */
	@Column(name = "oprate_psn")
	private String opratePsn;

	/**
	 * 操作时间
	 */
	@Column(name = "oprate_time")
	private Date oprateTime;

	/**
	 * 还款利息
	 */
	@Column(name = "pay_interest")
	private BigDecimal payInterest;

	/**
	 * 还款本金
	 */
	@Column(name = "pay_principal")
	private BigDecimal payPrincipal;

	/**
	 * 计划还款时间
	 */
	@Column(name = "payments_date")
	private java.sql.Date paymentsDate;

	/**
	 * 期限
	 */
	private long periods;

	/**
	 * 剩余本金
	 */
	@Column(name = "residual_principal")
	private BigDecimal residualPrincipal;
	/**
	 * 导入数据类型
	 */
	@Column(name = "data_type")
	private int dataType;

	/**
	 * 是否删除
	 */
	@Column(name = "is_del")
	private String isDel;

	@Column(name = "pay_total")
	private BigDecimal payTotal;

	@Column(name = "repayment_status")
	private String repaymentStatus;// 还款状态：PP 本金逾期，PI 利息逾期，PO 本息逾期，JQ 已结清，HKZ 还款中
	
	@Column(name = "pay_type")
	private String payType;

	public O2oPaymentsPlan() {
	}

	public String getPaymentsId() {
		return this.paymentsId;
	}

	public void setPaymentsId(String paymentsId) {
		this.paymentsId = paymentsId;
	}

	public String getBillCode() {
		return this.billCode;
	}

	public void setBillCode(String billCode) {
		this.billCode = billCode;
	}

	public String getOpratePsn() {
		return this.opratePsn;
	}

	public void setOpratePsn(String opratePsn) {
		this.opratePsn = opratePsn;
	}

	public Date getOprateTime() {
		return this.oprateTime;
	}

	public void setOprateTime(Date oprateTime) {
		this.oprateTime = oprateTime;
	}

	public BigDecimal getPayInterest() {
		return this.payInterest;
	}

	public void setPayInterest(BigDecimal payInterest) {
		this.payInterest = payInterest;
	}

	public BigDecimal getPayPrincipal() {
		return this.payPrincipal;
	}

	public void setPayPrincipal(BigDecimal payPrincipal) {
		this.payPrincipal = payPrincipal;
	}
	/**
	 * 计划还款时间
	 */
	public java.sql.Date getPaymentsDate() {
		return this.paymentsDate;
	}

	public void setPaymentsDate(java.sql.Date paymentsDate) {
		this.paymentsDate = paymentsDate;
	}

	public long getPeriods() {
		return this.periods;
	}

	public void setPeriods(long periods) {
		this.periods = periods;
	}

	public BigDecimal getResidualPrincipal() {
		return this.residualPrincipal;
	}

	public void setResidualPrincipal(BigDecimal residualPrincipal) {
		this.residualPrincipal = residualPrincipal;
	}

	public int getDataType() {
		return dataType;
	}

	public void setDataType(int dataType) {
		this.dataType = dataType;
	}

	public String getIsDel() {
		return isDel;
	}

	public void setIsDel(String isDel) {
		this.isDel = isDel;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getIdNumber() {
		return idNumber;
	}

	public void setIdNumber(String idNumber) {
		this.idNumber = idNumber;
	}

	public BigDecimal getPayTotal() {
		return payTotal;
	}

	public void setPayTotal(BigDecimal payTotal) {
		this.payTotal = payTotal;
	}

	public String getRepaymentStatus() {
		return repaymentStatus;
	}

	public void setRepaymentStatus(String repaymentStatus) {
		this.repaymentStatus = repaymentStatus;
	}

	public String getPayType() {
		return payType;
	}

	public void setPayType(String payType) {
		this.payType = payType;
	}

	@Override
	public String toString() {
		return "O2oPaymentsPlan [paymentsId=" + paymentsId + ", billCode=" + billCode + ", name=" + name + ", idNumber=" + idNumber + ", opratePsn=" + opratePsn + ", oprateTime=" + oprateTime + ", payInterest=" + payInterest + ", payPrincipal=" + payPrincipal + ", paymentsDate=" + paymentsDate
				+ ", periods=" + periods + ", residualPrincipal=" + residualPrincipal + ", dataType=" + dataType + ", isDel=" + isDel + ", payTotal=" + payTotal + ", repaymentStatus=" + repaymentStatus + ", payType=" + payType + "]";
	}
}